// ChannelHelper.cpp : Defines the exported functions for the DLL application.
//

#include "stdafx.h"
#include "Export.h"
#include <iostream>

#include "BlockingQueue.h"
#include "ThreadPool.h"

#include "Define.h"
#include "UtilFile.h"

#include "AdbInterface.h"

namespace ChannelHelpler{

	void start_log()
	{
		std::string configPath = Util::UtilFile::current_path();
		Util::UtilFile::append_path(configPath, "config.json");
		if (Util::UtilFile::is_path_exit(configPath))
		{
		}
	}

	void init(const char* app_name, const char* app_ver, bool root_flg)
	{
	}

	void test()
	{
		std::vector<std::string> device_list;
		AdbInterface::get_device_list(device_list);

		for (int i = 0; i < device_list.size(); i++){
			std::cout << device_list[i] << std::endl;

			std::cout << "Install apk\t:" << AdbInterface::install_apk(device_list[i].c_str(), "E:\\cloudSys\\Amazon.apk") << std::endl;

			std::string mac, imei;
			AdbInterface::get_mac_and_imei(device_list[i].c_str(), mac, imei);
			std::cout << "mac\t:" << mac << "\nimei\t:" << imei << std::endl;
			std::cout << "model\t:" << AdbInterface::get_product_model(device_list[i].c_str()) << std::endl;
			std::cout << "brand\t:" << AdbInterface::get_product_brand(device_list[i].c_str()) << std::endl;
			std::cout << "version\t:" << AdbInterface::get_version(device_list[i].c_str()) << std::endl;
			std::cout << "api\t:" << AdbInterface::get_build_api(device_list[i].c_str()) << std::endl << std::endl;

		}
	}
}